{% extends 'homepage.html' %}

{% block title %}Maass Form Page{% endblock %}

{% block body %}

<div id = "header">
<h1>{{ info.info1 }}</h1>
</div>

<div id = "Content">


<style type="text/css">
table.maass_table td {
	padding-left: 15px;
	padding-right: 15px;
	font-size: 80%;
}
table.maass_table tr.odd {
        background-color: #ffffff;
}
table.maass_table td.id {
	text-align: right;
}

table.maass_table td.highlight {
	background-color: #9e9;
}

table#maass_table_outer td {
	vertical-align: top;
}
</style>

<a href="{{ url_for('.render_maass_form') }}">CLEAR SELECTION</a>

<table id="maass_table_outer">
<tr><td>

<table class="maass_table" style="margin: 0;">
<tbody>
<tr>
<td>Group</td>
<!-- <td> odd </td> <td> even </td> -->
</tr>
{% set row_class = cycler('odd', 'even') %}
{% for level in info.maass_group %}
<tr class="{{ row_class.next() }}">
{% if info.cur_level == level %}
<td class="highlight">
{% else %}
<td>
{% endif %}
<a href="{{ url_for('.render_maass_form') }}?level={{level}}">\(\Gamma_0({{ level }})\)</a></td>
</tr>
{% endfor %}
</tbody>
</table>

<div> 
<a href="{{ url_for('.maass_form_picard')}}">\(PSL(Z[i]\)</a> <!-- added to include Holger Then's data on PSL(Z[i]) -->
</div>

</td>
{% if info.maass_weight %}
<td>
<table class="maass_table" style="margin: 0;">
<tbody>
<tr>
<td>Weight \(k\)</td>
<!-- <td> odd </td> <td> even </td> -->
</tr>
{% set row_class = cycler('odd', 'even') %}
{% for weight in info.maass_weight %}
<tr class="{{ row_class.next() }}">
{% if info.cur_weight == weight %}
<td class="highlight">
{% else %}
<td> 
{% endif %}

<a href="{{ url_for('.render_maass_form') }}?level={{info.cur_level}}&weight={{weight}}">{{weight}}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</td>
{% endif %}

{% if info.maass_character %}
<td>
<table class="maass_table" style="margin: 0;">
<tbody>
<tr>
<td>Character \(\chi\)</td>
<!-- <td> odd </td> <td> even </td> -->
</tr>
{% set row_class = cycler('odd', 'even') %}
{% for character in info.maass_character %}
<tr class="{{ row_class.next() }}">
{% if info.cur_character == character %}
<td class="highlight">
{% else %}
<td>
{% endif %}
<a href="{{ url_for('.render_maass_form') }}?level={{info.cur_level}}&weight={{info.cur_weight}}&character={{character}}">{{character}}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</td>
{% endif %}

</tr>
</table>

<a href="{{ url_for('.render_maass_form') }}">CLEAR SELECTION</a>

<h4>Eigenvalue \(\lambda = \frac{1}{4}+r^2\)</h4>
<div>
<form name="ev" action="{{ url_for('.render_maass_form') }}" method="get">
Search for \(r\): 
{% if info.search_for_ev_ev %}
<input name="eigenvalue" value="{{ info.search_for_ev}}" />
{% else %}
<input name="eigenvalue" />
{% endif %}
<input type="submit" value="search" />
{% if info.cur_level %}
<input type="hidden" name="level" value="{{info.cur_level}}" />
{% endif %}
{% if info.cur_weight %}
<input type="hidden" name="weight" value="{{info.cur_weight}}" />
{% endif %}
{% if info.cur_character %}
<input type="hidden" name="character" value="{{info.cur_character}}" />
{% endif %}
<!-- <input type="submit" name="search" value="search in selected" /> -->
</form>
</div>

{% for name,dbCollection,symkeys,maass_eigenvalue in info.maass_eigenvalue %}
<h4>Eigenvalues computed by {{ name|safe }}</h4>
<table class="maass_table" style="margin: 0;">
<tbody>
<tr>
<td></td>
{% for sk in symkeys %}
<td> {% if sk != 'none' %} {{ sk }} {% endif %} </td> 
{% endfor %}
</tr>
{% set row_class = cycler('odd', 'even') %}
{% for ev,id,sym,CID in maass_eigenvalue %}
<tr class="{{ row_class.next() }}">
<td class="id">{{ id+1 }} </td>
{% for sk in symkeys %}
<td> 
{% if sym == sk %}
<a href="{{ url_for('.render_maass_form') }}?db={{dbCollection}}&id={{CID}}">{{ ev }}</a>
{% endif %}
 </td> 
{% endfor %}

</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}

</div>

{% endblock %}
